using UnityEngine;
using System.Collections;

public class PlayerNetworkInit : MonoBehaviour {
	void Start(){
		DontDestroyOnLoad(gameObject);
	}
	void OnNetworkInstantiate(NetworkMessageInfo msg){
		if(networkView.isMine){
			Camera.main.SendMessage("setTarget",transform);
			transform.GetComponent<PlayerScript>().owner = Network.player;
		}
		else{
			name+= "Remote";
			gameObject.GetComponent<PlayerScript>().enabled = false;
		}
	}
}
